package com.xyx.ssm.jdbcdao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.xyx.ssm.po.SyOrg;

@Repository
public class syorgDao extends BaseDao {

	public List<Map<String, Object>> selectSyorgadd() {
		List<Map<String, Object>> list = sqlSession
				.selectList("com.xyx.ssm.jdbcdao.syorgDao.selectSyorgAll");
		return list;
	}
	
	public int syorgadd(SyOrg syOrg){
		int n=sqlSession.insert("com.xyx.ssm.jdbcdao.syorgDao.syorgadd", syOrg);
		return n;
		
	}
	
	public int syorgupdate(SyOrg syOrg) {
		int n=sqlSession.update("com.xyx.ssm.jdbcdao.syorgDao.syorgupdata", syOrg);
		return n;
		
	}
	
	public int syorgdelete(Integer id){
		int n=sqlSession.delete("com.xyx.ssm.jdbcdao.syorgDao.syorgdelect", id);
		return n;
		
	}

}
